Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports C4F.DevKit.Messaging
Namespace MapiApplication
	Public Partial Class Main
	Inherits Form
		#Region "Globals"
		Private m As MailClient = Nothing
		Private ps As ProfileSettings = Nothing
		Public Shared profileName As String = "Outlook"
		#End Region
		#Region "Constructors"
		Public Sub New()
			InitializeComponent()
		End Sub
		#End Region
		#Region "EventHandlers"
        Private Sub btnSettings_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSettings.Click
            Me.Hide()
            Windows.Forms.Cursor.Current = Cursors.WaitCursor
            Try
                ps = New ProfileSettings()
                ps.ShowDialog()
            Finally
                Windows.Forms.Cursor.Current = Cursors.[Default]
            End Try
            Dispose()
        End Sub
        Private Sub btnOpen_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnOpen.Click
            Me.Hide()
            Windows.Forms.Cursor.Current = Cursors.WaitCursor
            Try
                m = New MailClient(profileName)
                m.ShowDialog()
            Finally
                Windows.Forms.Cursor.Current = Cursors.[Default]
            End Try
            Dispose()
        End Sub
        Private Sub btnClose_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnClose.Click
            Me.Close()
        End Sub
		#End Region
	End Class
End Namespace
